package com.saer.client.button;

import com.saer.client.form.BaseSearchForm;
import com.smartgwt.client.widgets.Button;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;

public class ClearButton extends Button {

	public ClearButton(final BaseSearchForm searchForm) {
		this.setTitle("Clear");
		this.setIcon("icons/16/refresh.png");
		this.setTooltip("Clear Fields");
		this.setShowDisabledIcon(false);

		this.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				searchForm.clearValues();
			}
		});
	}

}
